<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<style>
    .block{
        width: 200px;
        height:120px;
        display: block;
        float: left;
        font-size:108px;
        text-align: center;
    }

    .test-5::-webkit-scrollbar {/*滚动条整体样式*/
        width: 15px;     /*高宽分别对应横竖滚动条的尺寸*/
        height: 10px;
    }
    .test-5::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
        border-radius: 10px;
        background-color: #F90;
        background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
    }
    .test-5::-webkit-scrollbar-track {/*滚动条里面轨道*/
        -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
        /*border-radius: 10px;*/
        background: #EDEDED;
    }
    body{
        background: blue;
    }
    /*
    background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
    */
</style>
<body>
<div class="test-5" style="background: yellow;overflow: scroll;height: 200px;">
    <button onclick="generateBlock">生成</button>
    <div id="groups">
        <div class="block" style="background: pink;">1</div>
        <div class="block" style="background: deepskyblue;">2</div>
        <div class="block" style="background: orange;"></div>
        <div class="block" style="background: red;"></div>
        <div class="block" style="background: cadetblue;"></div>
        <div class="block" style="background: purple;"></div>
        <div class="block" style="background: forestgreen;"></div>
        <div class="block" style="background: pink;"></div>
        <div class="block" style="background: deepskyblue;"></div>
        <div class="block" style="background: orange;"></div>
        <div class="block" style="background: red;"></div>
        <div class="block" style="background: cadetblue;"></div>
        <div class="block" style="background: purple;"></div>
        <div class="block" style="background: forestgreen;"></div>
    </div>
</div>
<div style="background: black;color: white;display:block">This is content</div>
</body>
</html>
<script>
    function generateBlock() {

        var ele=document.getElementById("groups");

    }
</script>